<template>
    <div class="back">
        <i class="iconfont icon-arrow-left-bold" @click="onBack" v-show="isBackIcon" :style="{'color':color}"></i>
    </div>
</template>

<script>
export default {
    name: 'TopbarBack',
    props: {
        isBackIcon: {
            type: Boolean,
            default: false
        },
        color: {
            type: String,
            default: '#666'
        }
    },
    methods: {
        onBack() {
            this.$emit('onBack')
        }
    }
}
</script>

<style scoped>
.back{
    width:0.6rem;
    height:0.6rem;
    line-height:0.4rem;
}
.back .icon-arrow-left-bold{
    font-size:0.48rem;
}
</style>